-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Actions: Add examples qlpack
#21177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Actions: Add examples qlpack
#21177
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds an examples qlpack for the Actions language to align with the structure expected by CI checks that compile queries from both src and examples directories for all languages.
Changes:
- Added
actions/ql/examples/qlpack.ymldefining the examples pack with appropriate dependencies - Added an example query
uses_pinned_sha.qldemonstrating how to find GitHub Actions steps that use pinned SHA versions
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| actions/ql/examples/qlpack.yml | Defines the codeql/actions-examples pack with dependency on codeql/actions-all |
| actions/ql/examples/snippets/uses_pinned_sha.ql | Example query finding uses steps with pinned SHA versions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
owen-mc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the other <lang>/ql/examples folders also have a file called qlpack.yml.lock. Is that needed here too?
3e39471 to
3cdca25
Compare
OK, I have generated one using |
owen-mc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a reasonable approach to fixing the failing CI. I don't know anything about qlpacks but this seems to match all the other languages.
Where did you come up with the example query, btw?
More or less randomly, by looking at the existing |
#21169 follow-up: The check now assumes that an
examplesfolder exists, so instead of special-casingactionsin the check, I thought it was easier to simply add anexamplesfolder.